/**
 * 
 */
package jmine.tec.di.type;


/**
 * {@link TypeConverter} para {@link Long} e long
 * 
 * @author takeshi
 */
public final class LongTypeConverter implements TypeConverter<Long> {
    /**
     * {@inheritDoc}
     */
    public Long convert(String value, Class<?> desiredType) throws TypeConvertionException {
        return Long.valueOf(value);
    }

    /**
     * {@inheritDoc}
     */
    public boolean isTypeCompatible(Class<?> type) {
        return type == Long.class || type == long.class;
    }
}